<?php
/*
Copy this file into your current active theme's directory to customize this template
This template displays all your tags in a tag cloud
*/
global $TanTanFlickrPlugin;
$max = 0;
if (is_array($tags)) foreach ($tags as $tag => $count) {
    if ($count > $max) $max = $count;
}
?>
<?php include($TanTanFlickrPlugin->getDisplayTemplate('/photoalbum-nav.html'));?>
<h2><?php _e('Tag Cloud', 'tantan-flickr');?></h2>
<div id="cloud">
<?php if (is_array($tags)): ?>
	<?php if (count($tags) > 0): foreach ($tags as $tag => $count):?>
	<span style="font-size:<?php echo (round(($count / $max)*100, 0)+100)?>%;"><a href="<?php echo ereg_replace(' ', '', $tag);?>/"><?php echo $tag?></a></span> 
	<?php endforeach; else:?>
		<?php _e('No tags found.', 'tantan-flickr');?>
	<?php endif;?>
<?php endif;?>
</div>
